package com.example.modulemain.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.modulemain.R;
import com.sdtv.basemodule.base.BaseActivity;
import com.sdtv.basemodule.router.ARouterUtils;

import butterknife.ButterKnife;

public class MainActivity extends BaseActivity {


    /**
     * 这是第一个按钮
     */
    private TextView mainTest1;
    /**
     * 这是第二个按钮
     */
    private TextView mainTest2;

    @Override
    public int getLayoutId() {
        return R.layout.activity_test;
    }

    @Override
    public void initView() {
        mainTest1 = findViewById(R.id.main_test1);
        mainTest2 = findViewById(R.id.main_test2);
        mainTest1.setText("111111111111");
        mainTest1.setOnClickListener(v -> {
            Bundle bundle = new Bundle();
            bundle.putString("testKey", "testValue");
            ARouterUtils.navigation("/loginmodule/loginIndex", bundle);
        });
    }

    @Override
    public void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
        setContentView(R.layout.activity_test);
        initView();
    }
}
